﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// “用户控件”项模板在 http://go.microsoft.com/fwlink/?LinkId=234236 上提供

namespace BasicLight.Client.Includes
{
    public sealed partial class Navigation : UserControl
    {
        public Navigation()
        {
            this.InitializeComponent();
        }

        private void BackClick(object sender, RoutedEventArgs e)
        {
            (Window.Current.Content as Frame).GoBack();
        }

        public String Title 
        {
            set
            {
                this.logo.Visibility = Visibility.Collapsed;
                this.title.Text = value;
            }
        }

        public bool IsBack 
        {
            set 
            {
                this.backButton.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
            }
        }

        public bool IsCategory
        {
            set
            {
                this.categoryComboBox.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
            }
        }
    }
}
